<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport"
			content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="format-detection" content="telephone=no" />
		<meta name="wap-font-scale" content="no" />
		<title>登录</title>
		<link rel="stylesheet" type="text/css" href="/css/public.css" />
		<link rel="stylesheet" type="text/css" href="/css/enterFm.css" />
		<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="/js/iscroll.js"></script>
		<script type="text/javascript" src="/js/common.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$(".mobile_menu_title").text("登录");

				var Request = GetRequest();
				if (Request) {
					$("input[name='from']").val(Request["from"]);
					$("input[name='uid']").val(Request["uid"]);
				}
				//获取来源页面
				var ref = '';
				if (document.referrer.length > 0) {
					ref = document.referrer;
				}
				try {
					if (ref.length == 0 && opener.location.href.length > 0) {
						ref = opener.location.href;
					}
				} catch (e) {}
				if (ref) {
					$("input[name='ref']").val(ref);
				}
			});

			function checkform() {
				if (form.un.value == "") {
					alert("请填写用户名。");
					return false;
				}
				if (form.psw.value == "") {
					alert("密码不得为空。");
					return false;
				}
				if (form.checkcode.value == "") {
					alert("验证码不得为空。");
					return false;
				}
				return true;
			}

			/**************************页面载入时获取url的参数值****************************/
			function GetRequest() {
				var url = location.search; //获取url中"?"符后的字串
				var theRequest = new Object();
				if (url.indexOf("?") != -1) {
					var str = url.substr(1);
					strs = str.split("&");
					for (var i = 0; i < strs.length; i++) {
						theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
					}
				} else {
					return false;
				}
				return theRequest;
			}
		</script>

	</head>

	<body>

		<div class="outBox">

			<!--页头 开始-->
			<div class="head">
				<div class="head_in mtIn">
					<div class="drop_menu_btn"></div>
					<div class="mobile_menu_title"></div>
					<div class="head_left">
						<div class="menu_box">
							<i class="close_menu_box"></i>
							<div class="menu_box_in" id="drop_menu">
								<ul>
									<li><a th:href="@{/index.html}">辞典</a></li>
									<li><a href="/hakka/tutorial.html">教材</a></li>
									<li><a href="/hakka/collect.html">词条收集</a></li>
									<li><a href="/hakka/mandarin_to_hakka.html">客普翻译</a></li>
									<li><a href="/hakka/hanzi_to_pinyin.html">线上注音</a></li>
									<li><a href="/hakka/languageRegion.html" target="_blank">语言地区</a></li>
									<!--									<li><a href="/hakka/voice.html">语音搜索</a></li>-->
									<li><a href="/hakka/hot.html">网址导航</a></li>
									<li><a href="/hakka/museum.html">客家博物馆</a></li>
									<!--									<li><a href="/hakka/voice.html">语音搜索</a></li>-->
									<!-- <li><a href="./hakka/ime/typewriting.htm">输入法</a></li> -->
									<!--li><a href="/hakka/bbs/" target="_blank">讨论</a></li-->

								</ul>
							</div>
						</div>
					</div>
					<div class="head_right">
						<ul class="head_right_list">
							<li><a href="/login.html">登录</a></li>
							<li class="register_btn"><a href="/register.html">注册</a></li>
						</ul>
					</div>
				</div>
			</div>
			<!--页头 结束-->

			<div class="content">
				<div class="title">登录账户</div>
				<div class="fm_box">

					<form method="get" action="/login" onsubmit="return checkform()" name="form">
						<input type="hidden" name="from" value="0">
						<input type="hidden" name="uid" value="0">
						<input type="hidden" name="ref" value="">
						<ul class="fm_list">
							<li>
								<span>用户名</span>
								<div class="inp_box">
									<input type="text" name="username" />
								</div>
							</li>
							<li>
								<span>密码</span>
								<div class="inp_box">
									<input type="password" name="password" />
								</div>
							</li>
							<li>
								<span>验证码</span>
								<div class="inp_box yz_box">
									<input type="text" name="checkcode" class="yz_wd" />
								</div>
<!--								<div class="form-group">-->
<!--									<input type="text" class="form-control" name="code" placeholder="验证码" required="">-->
<!--									<span class="p-new-code l-mar-r15"> <img src="http://127.0.0.1:5678/kaptcha/getKaptchaImage" class="reloadImage" id="reloadImage"-->
<!--																			 width="121" height="40"/> </span>-->
<!--									<a href="javaScript:;" class="l-color9 reloadImage">看不清楚，换一张</a>-->
<!--								</div>-->
							</li>
						</ul>

						<div class="sub_btn">
							<button>立即登录</button>
						</div>

						<div class="other_operate">
							<a href="/register.html" class="link_register">注册新用户</a>
							<a href="/reset_password.html" class="link_resetPassword">忘记密码?</a>
						</div>

					</form>

				</div>

			</div>
		</div>

	<script>
		/**************************验证码****************************/
		$(".reloadImage").click(function () {
			//获取当前的时间作为参数，无具体意义
			var timenow = new Date().getTime();
			$('#reloadImage').attr("src", "http://127.0.0.1:5678/kaptcha/getKaptchaImage?date=" + timenow);
		});
	</script>
	</body>

</html>
